#pragma once

#include <iostream>
#include <string>
#include <vector>
#include "smart_car.h"
#include "student.h"

// 分配模块
class DistributionManager {
public:
    DistributionManager(int carCount);
    void assignStudent();
    int setCars(vector<SmartCar>& cars);
    int setStuents(vector<Student>& stus);
    vector<SmartCar>& getDistributionCars();

private:
    std::vector<SmartCar> _cars;
    std::vector<Student> _stus;
    std::vector<SmartCar> _sortedCars;
    std::vector<Student> _sortedStus;
    void sortCars();
    void sortStudents();
    long long getCarIdNumber(SmartCar car);
    int getStuIdNumber(Student stu);
    int _carCount;
};